Skip to content

CI: Improve the Style Checks workflow to enforce underscores for both files and directories - #4876

Merged
seisman merged 2 commits into
mainfrom
ci/hyphen_underscore
Sep 4, 2026
Merged

CI: Improve the Style Checks workflow to enforce underscores for both files and directories#4876
seisman merged 2 commits into
mainfrom
ci/hyphen_underscore

Conversation

@seisman

@seisman seisman commented Sep 3, 2026

Copy link
Copy Markdown
Member

In #3703, we added a step to check that all Python files and directories use underscores, not hyphens, in their names.

This PR extends it to check all files.

There are a few exceptions and are ignored:

$ git ls-files | grep '-'
.github/ISSUE_TEMPLATE/1-bug_report.yaml
.github/ISSUE_TEMPLATE/2-feature_request.yaml
.github/ISSUE_TEMPLATE/3-module_request.md
.github/ISSUE_TEMPLATE/4-release_checklist.md
.github/ISSUE_TEMPLATE/5-bump_gmt_checklist.md
.github/release-drafter.yml
.github/workflows/check-links.yml
.github/workflows/format-command.yml
.github/workflows/publish-to-pypi.yml
.github/workflows/release-baseline-images.yml
.github/workflows/release-drafter.yml
.github/workflows/slash-command-dispatch.yml
.pre-commit-config.yaml
doc/_static/agu2017-poster.jpg
doc/_static/agu2019-poster.jpg
doc/_static/aogs2018-poster.jpg
doc/_static/fonts/Atkinson-Hyperlegible-Bold-102a.woff2
doc/_static/fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2
doc/_static/fonts/Atkinson-Hyperlegible-Italic-102a.woff2
doc/_static/fonts/Atkinson-Hyperlegible-Regular-102a.woff2
doc/_static/scipy2017-youtube-thumbnail.png
doc/_static/scipy2018-youtube-thumbnail.png
doc/_static/scipy2022-youtube-thumbnail.jpg
pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png
pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png
pygmt/tests/baseline/test_pygmtlogo_design_hexagon-horizontal.png
pygmt/tests/baseline/test_pygmtlogo_design_hexagon-vertical.png

@seisman seisman added maintenance Boring but important stuff for the core devs needs review This PR has higher priority and needs review. labels Sep 3, 2026
@seisman seisman added this to the 0.20.0 milestone Sep 3, 2026

@yvonnefroehlich yvonnefroehlich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use only underscores in the file names of this test images:

pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png
pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png
pygmt/tests/baseline/test_pygmtlogo_design_hexagon-horizontal.png
pygmt/tests/baseline/test_pygmtlogo_design_hexagon-vertical.png

@seisman

seisman commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

These names are auto-generated and we can't change them

@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Sep 4, 2026
@seisman
seisman merged commit cd1ba24 into main Sep 4, 2026
8 of 10 checks passed
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Sep 4, 2026
@seisman
seisman deleted the ci/hyphen_underscore branch September 4, 2026 11:35
@seisman seisman added the skip-changelog Skip adding Pull Request to changelog label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants